package zeus.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 * Entity implementation class for Entity: Estadia
 *
 */
@Entity
public class Estadia implements Serializable {

	
	private static final long serialVersionUID = 1L;

	public Estadia() {
		super();
		this.consumiveis = new ArrayList<Consumivel>();
		this.extras = new ArrayList<Extra>();
	}
	
	@Id
	@GeneratedValue
	private long id;
	
	@OneToOne
	@JoinColumn(name="hospede_id")
	private Cliente hospede;
	
	@OneToOne
	@JoinColumn(name="quarto_id")
	private Quarto quarto;
	
	@OneToMany(cascade= CascadeType.PERSIST)
	private List<Consumivel> consumiveis;
	
	@OneToMany(cascade= CascadeType.PERSIST)
	private List<Extra> extras;
	
	private double valorTotal;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Cliente getHospede() {
		return hospede;
	}

	public void setHospede(Cliente hospede) {
		this.hospede = hospede;
	}

	public double getValorTotal() {
		return valorTotal;
	}

	public void setValorTotal(double valorTotal) {
		this.valorTotal = valorTotal;
	}

	public Quarto getQuarto() {
		return quarto;
	}

	public void setQuarto(Quarto quarto) {
		this.quarto = quarto;
	}

	public List<Consumivel> getConsumiveis() {
		return consumiveis;
	}

	public void setConsumiveis(List<Consumivel> consumiveis) {
		this.consumiveis = consumiveis;
	}

	public List<Extra> getExtras() {
		return extras;
	}

	public void setExtras(List<Extra> extras) {
		this.extras = extras;
	}
	
	
	
	
	
	
	
	
   
}
